<include file="Public:header" />
<!--主体内容-->
<!--左边-->
<div class="centent_box">
    <include file="Public:left" />
    <!--右边-->
    <div class="centent_right_box">
        <div class="centent_right rightCon">
            <div class="Mtitle">
                <ul>
                    <li class="on"><span>成交管理</span></li>
                </ul>
                <div class="rightWord"><a href="{:U('Deal/index')}">成交管理</a> &gt;&gt; 报告详情</div>
            </div>
                <div class="used-centent">
                    <ul class="formList width2 list_ul list_mp">
                        <li>
                            <label>房源名称：</label>
                            <input type="text"  value="{$deal.title}" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                        <li>
                            <label>成交日期：</label>
                            <input type="text"  value="{$deal.deal_time}" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                        <li>
                            <label>交易方式：</label>
                            <input type="text"  value="<if condition='$deal.sell_type eq 1'>出售<else/>出租</if>" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                        <li>
                            <label>成交价格：</label>
                            <input type="text"  value="{$deal.money}" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                        <li>
                            <label>佣金总额：</label>
                            <input type="text"  value="{$deal.poundage}" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                        <li>
                            <label>已收佣金：</label>
                            <input type="text"  value="{$deal.received}" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                        <li>
                            <label>佣金扣除：</label>
                            <input type="text"  value="{$deal.deduct}" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                        <li>
                            <label>佣金备注：</label>
                            <input type="text"  value="{$deal.diary}" class="inputStyle width3" readonly style="text-align: center">
                        </li>
                    </ul>
                    <div>
                        <h5>佣金比例：</h5>
                        <table style="BORDER-LEFT-WIDTH: 0px; BORDER-COLLAPSE: collapse; BORDER-RIGHT-WIDTH: 0px" borderColor=#ff6600 bgColor=#DFFFDF cellSpacing=0 cellPadding=0 width=100%  border=1>
                            <tbody>
                            <volist name="allocs" id="vo">
                                <tr>
                                    <td align=middle style="BORDER-RIGHT: medium none; BORDER-LEFT: medium none" height=40>{$vo.ratio}%</td>
                                    <td align=middle style="BORDER-RIGHT: medium none; BORDER-LEFT: medium none" height=40>{$vo.amount}</td>
                                    <td align=middle style="BORDER-RIGHT: medium none; BORDER-LEFT: medium none" height=40>{$vo.reason}</td>
                                    <td align=middle style="BORDER-RIGHT: medium none; BORDER-LEFT: medium none" height=40>
                                        <span style="background-color:#CCCCCC;border-radius:20%;padding: 3px 5px 3px 5px;">{$vo.name}</span>
                                        <em style="margin-left: 10px"> > </em>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>

                </div>
                <div style="margin-top: 30px">
                    <button onclick="view_info({$deal.deal_id})">合同买卖信息 ：</button>
                </div>

        </div>
    </div>
</div>
<script>
    function view_info (id){
        var url = "{:U('deal/details')}&id="+id;
        var data = {};
        $.get (url, data, function(response){
            if (response.state == 'ok'){
                var data = response.data;
                var html = '<div style="margin: 10px 20px 20px 10px">';
                html += '<div><label>卖方/业主:</label><input style="height: 20px;padding: 10px 20px  10px  10px " type="text" value="'+data.proprietor+'" ></div>';
                html += '<div><label>联系方式:</label><input style="height: 20px;padding: 10px 20px  10px  10px " type="text" value="'+data.p_phone+'" ></div>';
                html += '<div><label>证件号码:</label><input style="height: 20px;padding: 10px 20px  10px  10px " type="text" value="'+data.p_card+'" ></div>';
                html += '<div><label>买方/客户:</label><input style="height: 20px;padding: 10px 20px  10px  10px " type="text" value="'+data.customer+'" ></div>';
                html += '<div><label>联系方式:</label><input style="height: 20px;padding: 10px 20px  10px  10px " type="text" value="'+data.c_phone+'" ></div>';
                html += '<div><label>证件号码:</label><input style="height: 20px;padding: 10px 20px  10px  10px " type="text" value="'+data.c_card+'" ></div>';
                html += '<div><label style="margin-right: 20px">合同备注:</label><textarea rows="4" cols="55" type="text" value="'+data.remark+'" ></textarea></div>';
                html += '</div>';
                layer.open({
                    area: ['500px', '400px'],
                    type: 1,
                    content: html
                });
            }
        }, 'json');
    }
</script>
<include file="Public:footer" />